import multiprocessing
import time
import os

def dance():
    for i in range(3):
        print("跳舞中...")
        time.sleep(0.2)
def changge():
    sub1change=multiprocessing.current_process()
    print(sub1change)
    zjc=os.getpid()
    parentid=os.getppid()
    print(zjc)
    print(parentid)
    for i in range(3):
        print("唱歌中...")
        time.sleep(0.2)
if __name__=='__main__':
    # dance()
    # changge()
    mainprocess= multiprocessing.current_process()
    print(mainprocess)
    
    print(os.getpid())
    subprocess1=multiprocessing.Process(target=dance)
    subprocess2 = multiprocessing.Process(target=changge)
    subprocess1.start()
    subprocess2.start()